import { http } from '@/utils/request'

// 获取大屏设备装修数据
export function getFloorData() {
  return http.request({
    url: `/screen/decoration`,
    method: 'GET'
  })
}

// 获取待机屏幕图片
export function getWaitPicsData() {
  return http.request({
    url: `screen/waitPics`,
    method: 'GET'
  })
}

// 获取功能装修数据
export function getPageDataByCode(functionCode: string) {
  return http.request({
    url: `/screen/getPageDataByCode/${functionCode}`,
    method: 'GET'
  })
}

export function getClassifyId(functionCode: string) {
  return http.request({
    url: `/screen/classifyByFunctionCode/${functionCode}`,
    method: 'GET'
  })
}

// 获取分类下文章列表
export function getArticleListByClassifyId(query: {
  classifyId: number
  pageNum: number
  pageSize: number
}) {
  return http.request({
    url: `/screen/content/page/${query.classifyId}/${query.pageNum}/${query.pageSize}`,
    method: 'GET'
  })
}

// 获取文章详情
export function getArticleDetail(contentId: number) {
  return http.request({
    url: `/screen/contentById/${contentId}`,
    method: 'GET'
  })
}

// 获取所有区域
export function getAllArea() {
  return http.request({
    url: `/screen/venueArea/allList`,
    method: 'GET'
  })
}

// 获取所有楼层
export function getAllFloor() {
  return http.request({
    url: `/screen/venueFloor/allList`,
    method: 'GET'
  })
}

// 获取楼层区域导览图
export function getVenueContent(query: any) {
  return http.request({
    url: `screen/venueContent/list`,
    method: 'GET',
    params: query
  })
}
